<script setup>
import ShoppingCart from '@/assets/image/shoppingCart.png'
import Tag from '@/assets/image/tag.png'
const props = defineProps({
  options: {
    type: Object,
    default: () => {
      return {}
    }
  }
})

const tAnimationConfig = computed(() => {
  return {
    Basis: 'y',
    Duration: 2000,
    Length: props.options.yAxis ? props.options.yAxis.data.length : 99
  }
})
</script>

<template>
  <div style="width: 100%; height: 100%">
    <dv-border-box7 class="my-box7" :color="['#0749a3', '#4195d2']">
      <div class="sc-list">
        <div style="display: flex; align-items: center">
          <div class="sc">
            <div class="sc-content">
              <div style="width: 25px; aspect-ratio: 1">
                <el-image :src="ShoppingCart" fit="contain"></el-image>
              </div>
            </div>
          </div>
          <div>
            <div class="content-text">
              {{ props.options.YfOAmountWithTax }}
            </div>
            <div class="content-label">年采购成本（万）</div>
          </div>
        </div>
        <div style="display: flex; align-items: center">
          <div class="sc">
            <div class="sc-content">
              <div style="width: 25px; aspect-ratio: 1">
                <el-image :src="Tag" fit="contain"></el-image>
              </div>
            </div>
          </div>
          <div>
            <div class="content-text">
              {{ props.options.YsOAmountWithTax }}
            </div>
            <div class="content-label">年销售（万）</div>
          </div>
        </div>
        
      </div>
    </dv-border-box7>
  </div>
</template>

<style scoped lang="scss">
.sc-list {
  display: flex;
  justify-content: space-evenly;
}
@font-face {
  font-family: 'UnidreamLED';
  src: url(../../../assets/font/DS-Digital/DS-DIGI-1.ttf); /***兼容ie9***/
}

.content-text {
  font-size: 32px;
  color: #0e94ea;
  font-family: UnidreamLED;
  font-weight: bold;
}

.content-label{
  font-size: 12px;
  color: #ccc1c1;
}

.sc {
  position: relative;
  height: 100px;
  aspect-ratio: 1;

  &-content {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  &::after {
    content: '';
    position: absolute;
    height: 100px;
    aspect-ratio: 1;
    left: 0;
    top: 0;
    z-index: 1;
    background: url('../../../assets/image/word.png') 0px 0px no-repeat;
    background-size: cover;
    animation: dsc 5s linear infinite;
  }
}

@keyframes dsc {
  0% {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
</style>
